/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ws
 * Date: 2024-02-02
 * Time: 14:04
 *
 * https://www.nowcoder.com/share/jump/7745334641706854293573
 */
public class BM91 {

    public String solve(String str) {
        if (str.isEmpty()) {
            return "";
        }
        char[] tmp = str.toCharArray();
        int left = 0, right = str.length() - 1;
        while (left < right) {
            char val = tmp[left];
            tmp[left] = tmp[right];
            tmp[right] = val;
            left++;
            right--;
        }
        return new String(tmp);
    }
}
